home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Entertainment / Chance / HyperCraps 1.02 / background_2725.txt < prev    next >
Encoding:
Text File  |  1988-04-23  |  13.9 KB  |  624 lines

  1. -- background: 2725 from stack: in.02
  2. -- bmap block id: 6320
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6.  
  7.  
  8. -- part 29 (button)
  9. -- low flags: 00
  10. -- high flags: 0000
  11. -- rect: left=24 top=291 right=311 bottom=42
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: gotpoint
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   global point,bankroll,pointbut
  23.   put word 1 of line 1 of field "bet info" into temp
  24.   get the length of temp
  25.   put char 2 to it of temp into betamount
  26.   add betamount to bankroll
  27.   if (2*betamount)>1000 then put 500 into betamount
  28.   put "$" & (2*betamount) into word 1 of line 1 of field "bet info"
  29.   put word 1 of line 2 of field "bet info" into temp
  30.   get the length of temp
  31.   put char 2 to it of temp into betamount
  32.   subtract betamount from bankroll
  33.   put "$" & 0 into word 1 of line 2 of field "bet info"
  34.   hide bkgnd button pointbut
  35.   put "true" into comingout
  36.   put "$" & bankroll into word 1 of field "bankroll amount"
  37. end mouseUp
  38.  
  39.  
  40.  
  41. -- part 1 (button)
  42. -- low flags: 00
  43. -- high flags: 0000
  44. -- rect: left=17 top=230 right=259 bottom=70
  45. -- title width / last selected line: 0
  46. -- icon id / first selected line: 0 / 0
  47. -- text alignment: 1
  48. -- font id: 0
  49. -- text size: 12
  50. -- style flags: 0
  51. -- line height: 16
  52. -- part name: Roll Dice
  53. ----- HyperTalk script -----
  54. on mouseUp
  55.   global point,bankroll,pointbut,comingout
  56.   put "false" into test
  57.   put random of 6 into dice1
  58.   put random of 6 into dice2
  59.   put dice1+dice2 into dicetotal
  60.   put "?" into field "dice"
  61.  
  62.   put dicetotal into field "dice"
  63.  
  64.   if comingout then
  65.     if dicetotal=7 or dicetotal=11 then
  66.       play "harpsichord" tempo 300 c6 c6 c6
  67.       send "mouseup" to bkgnd button "gotpoint"
  68.     end if
  69.     if dicetotal=2 or dicetotal=3 then
  70.       play "boing"
  71.       send "mouseup" to bkgnd button "nopoint"
  72.     end if
  73.     if dicetotal =12 then
  74.       play "boing"
  75.       put word 1 of line 1 of field "bet info" into temp
  76.       get the length of temp
  77.       put char 2 to it of temp into betamount
  78.       subtract betamount from bankroll
  79.       put "$" & 0 into word 1 of line 1 of field "bet info"
  80.       put "true" into comingout
  81.       put "$" & bankroll into word 1 of field "bankroll amount"
  82.  
  83.     end if
  84.     put dicetotal into dt
  85.     if dt=4 or dt=5 or dt=6 or dt=8 or dt=9 or dt=10 then
  86.  
  87.  
  88.       put dicetotal into point
  89.       put "point" & point into pointbut
  90.       show bkgnd button pointbut
  91.       put "false"into comingout
  92.     end if
  93.     put "true" into test
  94.  
  95.   end if
  96.   if not test then
  97.     if dicetotal = point then
  98.       play "harpsichord" tempo 300 c6 c6 c6
  99.       hide bkgnd button pointbut
  100.       put "true" into comingout
  101.       send "mouseup" to bkgnd button "gotpoint"
  102.     end if
  103.     if dicetotal=7 then
  104.       play "boing"
  105.       hide bkgnd button pointbut
  106.       put "true" into comingout
  107.       send "mouseup" to bkgnd button "nopoint"
  108.     end if
  109.     put "false" into test
  110.   end if
  111.  
  112. end mouseUp
  113.  
  114.  
  115.  
  116. -- part 30 (button)
  117. -- low flags: 00
  118. -- high flags: 0000
  119. -- rect: left=45 top=282 right=298 bottom=63
  120. -- title width / last selected line: 0
  121. -- icon id / first selected line: 0 / 0
  122. -- text alignment: 1
  123. -- font id: 0
  124. -- text size: 12
  125. -- style flags: 0
  126. -- line height: 16
  127. -- part name: nopoint
  128. ----- HyperTalk script -----
  129. on mouseUp
  130.   global point,bankroll,pointbut
  131.   put word 1 of line 1 of field "bet info" into temp
  132.   get the length of temp
  133.   put char 2 to it of temp into betamount
  134.   subtract betamount from bankroll
  135.   put "$" & 0 into word 1 of line 1 of field "bet info"
  136.   put word 1 of line 2 of field "bet info" into temp
  137.   get the length of temp
  138.   put char 2 to it of temp into betamount
  139.   add betamount to bankroll
  140.   if (2*betamount)>1000 then put 500 into betamount
  141.   put "$" & (2*betamount) into word 1 of line 2 of field "bet info"
  142.   hide bkgnd button pointbut
  143.   put "true" into comingout
  144.   put "$" & bankroll into word 1 of field "bankroll amount"
  145. end mouseUp
  146.  
  147.  
  148.  
  149. -- part 2 (button)
  150. -- low flags: 80
  151. -- high flags: A000
  152. -- rect: left=15 top=273 right=330 bottom=72
  153. -- title width / last selected line: 65535
  154. -- icon id / first selected line: -15643 / 49893
  155. -- text alignment: 1
  156. -- font id: 0
  157. -- text size: 12
  158. -- style flags: 0
  159. -- line height: 16
  160. -- part name: Quit Craps
  161. ----- HyperTalk script -----
  162. on mouseUp
  163.   answer "What is Your Fancy?" with "Quit" or "New game"or "Cancel"
  164.   if it="quit" then
  165.     visual effect dissolve
  166.     go home
  167.   else send "opencard"
  168.  
  169. end mouseUp
  170.  
  171.  
  172.  
  173. -- part 3 (field)
  174. -- low flags: 01
  175. -- high flags: 0000
  176. -- rect: left=26 top=189 right=213 bottom=57
  177. -- title width / last selected line: 0
  178. -- icon id / first selected line: 0 / 0
  179. -- text alignment: 1
  180. -- font id: 0
  181. -- text size: 18
  182. -- style flags: 256
  183. -- line height: 24
  184. -- part name: dice
  185.  
  186.  
  187. -- part 4 (field)
  188. -- low flags: 01
  189. -- high flags: 0000
  190. -- rect: left=406 top=314 right=337 bottom=485
  191. -- title width / last selected line: 0
  192. -- icon id / first selected line: 0 / 0
  193. -- text alignment: 0
  194. -- font id: 36
  195. -- text size: 18
  196. -- style flags: 0
  197. -- line height: 24
  198. -- part name: bet total
  199.  
  200.  
  201. -- part 5 (field)
  202. -- low flags: 01
  203. -- high flags: 0004
  204. -- rect: left=202 top=219 right=342 bottom=399
  205. -- title width / last selected line: 0
  206. -- icon id / first selected line: 0 / 0
  207. -- text alignment: 0
  208. -- font id: 0
  209. -- text size: 12
  210. -- style flags: 8448
  211. -- line height: 16
  212. -- part name: Bet Info
  213.  
  214.  
  215. -- part 6 (field)
  216. -- low flags: 01
  217. -- high flags: 0002
  218. -- rect: left=239 top=193 right=219 bottom=367
  219. -- title width / last selected line: 0
  220. -- icon id / first selected line: 0 / 0
  221. -- text alignment: 0
  222. -- font id: 0
  223. -- text size: 18
  224. -- style flags: 8448
  225. -- line height: 24
  226. -- part name: Betting Title
  227.  
  228.  
  229. -- part 7 (button)
  230. -- low flags: 00
  231. -- high flags: 2000
  232. -- rect: left=405 top=236 right=256 bottom=446
  233. -- title width / last selected line: 0
  234. -- icon id / first selected line: 0 / 0
  235. -- text alignment: 1
  236. -- font id: 0
  237. -- text size: 12
  238. -- style flags: 0
  239. -- line height: 16
  240. -- part name: one dollar
  241. ----- HyperTalk script -----
  242. on mouseUp
  243.   global bettotal,bankroll
  244.   if 1+bettotal>bankroll then
  245.     answer "Your bet can not exceed your bankroll" with "ok"
  246.   else
  247.  
  248.     put 1+bettotal into bettotal
  249.     put bettotal into field "bet total"
  250.   end if
  251.  
  252. end mouseUp
  253.  
  254.  
  255.  
  256. -- part 8 (button)
  257. -- low flags: 00
  258. -- high flags: 2000
  259. -- rect: left=405 top=256 right=276 bottom=446
  260. -- title width / last selected line: 0
  261. -- icon id / first selected line: 0 / 0
  262. -- text alignment: 1
  263. -- font id: 0
  264. -- text size: 12
  265. -- style flags: 0
  266. -- line height: 16
  267. -- part name: ten dollar
  268. ----- HyperTalk script -----
  269. on mouseUp
  270.   global bettotal,bankroll
  271.   if 10+bettotal>bankroll then
  272.     answer "Your bet can not exceed your bankroll" with "ok"
  273.   else
  274.     put 10+bettotal into bettotal
  275.     put bettotal into field "bet total"
  276.   end if
  277.  
  278. end mouseUp
  279.  
  280.  
  281.  
  282. -- part 9 (button)
  283. -- low flags: 00
  284. -- high flags: 2000
  285. -- rect: left=405 top=277 right=295 bottom=446
  286. -- title width / last selected line: 0
  287. -- icon id / first selected line: 0 / 0
  288. -- text alignment: 1
  289. -- font id: 0
  290. -- text size: 12
  291. -- style flags: 0
  292. -- line height: 16
  293. -- part name: fifty dollar
  294. ----- HyperTalk script -----
  295. on mouseUp
  296.   global bettotal,bankroll
  297.   if 50+bettotal>bankroll then
  298.     answer "Your bet can not exceed your bankroll" with "ok"
  299.   else
  300.  
  301.  
  302.     put 50+bettotal into bettotal
  303.     put bettotal into field "bet total"
  304.   end if
  305.  
  306. end mouseUp
  307.  
  308.  
  309.  
  310. -- part 10 (button)
  311. -- low flags: 00
  312. -- high flags: 2000
  313. -- rect: left=448 top=276 right=296 bottom=489
  314. -- title width / last selected line: 0
  315. -- icon id / first selected line: 0 / 0
  316. -- text alignment: 1
  317. -- font id: 0
  318. -- text size: 12
  319. -- style flags: 0
  320. -- line height: 16
  321. -- part name: one hundred dollar
  322. ----- HyperTalk script -----
  323. on mouseUp
  324.   global bettotal,bankroll
  325.   if 100+bettotal>bankroll then
  326.     answer "Your bet can not exceed your bankroll" with "ok"
  327.   else
  328.  
  329.  
  330.     put 100+bettotal into bettotal
  331.     put bettotal into field "bet total"
  332.   end if
  333.  
  334. end mouseUp
  335.  
  336.  
  337.  
  338. -- part 11 (button)
  339. -- low flags: 00
  340. -- high flags: 2000
  341. -- rect: left=448 top=256 right=276 bottom=489
  342. -- title width / last selected line: 0
  343. -- icon id / first selected line: 0 / 0
  344. -- text alignment: 1
  345. -- font id: 0
  346. -- text size: 12
  347. -- style flags: 0
  348. -- line height: 16
  349. -- part name: twenty five dollar
  350. ----- HyperTalk script -----
  351. on mouseUp
  352.   global bettotal,bankroll
  353.   if 25+bettotal>bankroll then
  354.     answer "Your bet can not exceed your bankroll" with "ok"
  355.   else
  356.  
  357.  
  358.     put 25+bettotal into bettotal
  359.     put bettotal into field "bet total"
  360.   end if
  361.  
  362. end mouseUp
  363.  
  364.  
  365.  
  366. -- part 12 (button)
  367. -- low flags: 00
  368. -- high flags: 2000
  369. -- rect: left=448 top=236 right=256 bottom=489
  370. -- title width / last selected line: 0
  371. -- icon id / first selected line: 0 / 0
  372. -- text alignment: 1
  373. -- font id: 0
  374. -- text size: 12
  375. -- style flags: 0
  376. -- line height: 16
  377. -- part name: five dollar
  378. ----- HyperTalk script -----
  379. on mouseUp
  380.   global bettotal,bankroll
  381.   if 5+bettotal>bankroll then
  382.     answer "Your bet can not exceed your bankroll" with "ok"
  383.   else
  384.     put 5+bettotal into bettotal
  385.     put bettotal into field "bet total"
  386.   end if
  387.  
  388. end mouseUp
  389.  
  390.  
  391.  
  392. -- part 13 (button)
  393. -- low flags: 00
  394. -- high flags: 2000
  395. -- rect: left=403 top=296 right=314 bottom=491
  396. -- title width / last selected line: 0
  397. -- icon id / first selected line: 0 / 0
  398. -- text alignment: 1
  399. -- font id: 0
  400. -- text size: 12
  401. -- style flags: 0
  402. -- line height: 16
  403. -- part name: clear bet
  404. ----- HyperTalk script -----
  405. on mouseUp
  406.   global bettotal
  407.   put 0 into bettotal
  408.   put bettotal into field "bet total"
  409. end mouseUp
  410.  
  411.  
  412.  
  413. -- part 14 (button)
  414. -- low flags: 00
  415. -- high flags: 0000
  416. -- rect: left=103 top=167 right=186 bottom=301
  417. -- title width / last selected line: 0
  418. -- icon id / first selected line: 0 / 0
  419. -- text alignment: 1
  420. -- font id: 0
  421. -- text size: 12
  422. -- style flags: 0
  423. -- line height: 16
  424. -- part name: Pass line 1
  425. ----- HyperTalk script -----
  426. on mouseUp
  427.   global bettotal,bankroll,comingout
  428.   if bettotal>bankroll then
  429.     answer "Your bet can not exceed your bankroll" with "OK"
  430.   else
  431.     put word 1 of field "bet info" into temp
  432.     get the length of temp
  433.     get char 2 to it of temp
  434.     if not comingout and bettotal<it then
  435.       answer "You may not remove Pass Line bets now" with "OK"
  436.     else
  437.  
  438.       put "$" & bettotal && "on Pass Line" into info
  439.       put info into line 1 of field "bet info"
  440.     end if
  441.   end if
  442.  
  443. end mouseUp
  444.  
  445.  
  446.  
  447. -- part 15 (button)
  448. -- low flags: 00
  449. -- high flags: 0000
  450. -- rect: left=102 top=20 right=174 bottom=122
  451. -- title width / last selected line: 0
  452. -- icon id / first selected line: 0 / 0
  453. -- text alignment: 1
  454. -- font id: 0
  455. -- text size: 12
  456. -- style flags: 0
  457. -- line height: 16
  458. -- part name: Pass line 2
  459. ----- HyperTalk script -----
  460. on mouseUp
  461.   send "mouseup" to bkgnd button "pass line 1"
  462. end mouseUp
  463.  
  464.  
  465.  
  466. -- part 16 (button)
  467. -- low flags: 80
  468. -- high flags: 0006
  469. -- rect: left=133 top=55 right=67 bottom=152
  470. -- title width / last selected line: 0
  471. -- icon id / first selected line: 0 / 0
  472. -- text alignment: 1
  473. -- font id: 0
  474. -- text size: 12
  475. -- style flags: 0
  476. -- line height: 16
  477. -- part name: point4
  478.  
  479.  
  480. -- part 21 (button)
  481. -- low flags: 80
  482. -- high flags: 0006
  483. -- rect: left=161 top=55 right=67 bottom=180
  484. -- title width / last selected line: 0
  485. -- icon id / first selected line: 0 / 0
  486. -- text alignment: 1
  487. -- font id: 0
  488. -- text size: 12
  489. -- style flags: 0
  490. -- line height: 16
  491. -- part name: point5
  492.  
  493.  
  494. -- part 22 (button)
  495. -- low flags: 80
  496. -- high flags: 0006
  497. -- rect: left=189 top=55 right=67 bottom=208
  498. -- title width / last selected line: 0
  499. -- icon id / first selected line: 0 / 0
  500. -- text alignment: 1
  501. -- font id: 0
  502. -- text size: 12
  503. -- style flags: 0
  504. -- line height: 16
  505. -- part name: point6
  506.  
  507.  
  508. -- part 23 (button)
  509. -- low flags: 80
  510. -- high flags: 0006
  511. -- rect: left=217 top=55 right=67 bottom=236
  512. -- title width / last selected line: 0
  513. -- icon id / first selected line: 0 / 0
  514. -- text alignment: 1
  515. -- font id: 0
  516. -- text size: 12
  517. -- style flags: 0
  518. -- line height: 16
  519. -- part name: point8
  520.  
  521.  
  522. -- part 24 (button)
  523. -- low flags: 80
  524. -- high flags: 0006
  525. -- rect: left=245 top=55 right=67 bottom=264
  526. -- title width / last selected line: 0
  527. -- icon id / first selected line: 0 / 0
  528. -- text alignment: 1
  529. -- font id: 0
  530. -- text size: 12
  531. -- style flags: 0
  532. -- line height: 16
  533. -- part name: point9
  534.  
  535.  
  536. -- part 25 (button)
  537. -- low flags: 80
  538. -- high flags: 0006
  539. -- rect: left=272 top=55 right=67 bottom=291
  540. -- title width / last selected line: 0
  541. -- icon id / first selected line: 0 / 0
  542. -- text alignment: 1
  543. -- font id: 0
  544. -- text size: 12
  545. -- style flags: 0
  546. -- line height: 16
  547. -- part name: point10
  548.  
  549.  
  550. -- part 27 (field)
  551. -- low flags: 01
  552. -- high flags: 0000
  553. -- rect: left=4 top=61 right=88 bottom=82
  554. -- title width / last selected line: 0
  555. -- icon id / first selected line: 0 / 0
  556. -- text alignment: 1
  557. -- font id: 0
  558. -- text size: 12
  559. -- style flags: 256
  560. -- line height: 16
  561. -- part name: Bankroll amount
  562.  
  563.  
  564. -- part 28 (button)
  565. -- low flags: 00
  566. -- high flags: 0000
  567. -- rect: left=149 top=151 right=168 bottom=301
  568. -- title width / last selected line: 0
  569. -- icon id / first selected line: 0 / 0
  570. -- text alignment: 1
  571. -- font id: 0
  572. -- text size: 12
  573. -- style flags: 0
  574. -- line height: 16
  575. -- part name: New Button
  576. ----- HyperTalk script -----
  577. on mouseUp
  578.   global bettotal,bankroll,comingout
  579.   if bettotal>bankroll then
  580.     answer "Your bet can not exceed your bankroll" with "ok"
  581.   else
  582.     if not comingout and bettotal >0 then
  583.       answer "You may not make Don't Pass bets now" with "OK"
  584.     else
  585.  
  586.  
  587.       put "$" & bettotal && "on Don't Pass" into info
  588.       put info into line 2 of field "bet info"
  589.     end if
  590.   end if
  591.  
  592. end mouseUp
  593.  
  594.  
  595.  
  596. -- part 32 (button)
  597. -- low flags: 00
  598. -- high flags: A003
  599. -- rect: left=7 top=109 right=132 bottom=82
  600. -- title width / last selected line: 0
  601. -- icon id / first selected line: 0 / 0
  602. -- text alignment: 1
  603. -- font id: 0
  604. -- text size: 12
  605. -- style flags: 0
  606. -- line height: 16
  607. -- part name: The Bank
  608. ----- HyperTalk script -----
  609. on mouseUp
  610.   global Bankroll
  611.   if bankroll>0 then
  612.     answer "Sorry, you still have cash" with "OK"
  613.   else
  614.  
  615.     answer "You have credit lines available of..." with "500" or "200" or"50"
  616.     if it=500 then add 500 to bankroll
  617.     if it=200 then add 200 to bankroll
  618.     if it=50 then add 50 to bankroll
  619.     put "$" & bankroll into field "bankroll amount"
  620.   end if
  621.  
  622. end mouseUp
  623.  
  624.